#pragma once
#include "Image.h"

class AnimImage : public Image
{
public:
	vector<SDL_Rect> AnimBox;
	Uint8 CurrentFrame;
	Uint8 FrameCount;
	PixPtr FrameSize;

	vector<SDL_Rect> InitVector(int Frames);
	SDL_Rect AllocFrame(int FrameNumber, int X, int Y, int W, int H);
	SDL_Rect AutoAllocFrame(int Columns, int Lines);
	void CurrentFrameIncr();
	void LoadSurface(string FileName, int Columns, int Rows);
	void Draw(int X, int Y);
	void Draw(PixPtr Pos);
	void DrawFrame(int X, int Y, int FrameNum);
	void DrawFrame(PixPtr Pos, int FrameNum);

	AnimImage();
	AnimImage(string FileName, int Columns, int Rows);
};